package com.smzd.framework.config.authentications;

import java.util.Collection;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

public class BridgeAuthentication extends AbstractAuthenticationToken {
    private static final long serialVersionUID = -8241267477423040708L;
    private final Object principal;

    public BridgeAuthentication(Object principal, Collection<? extends GrantedAuthority> authorities) {
        super(authorities);
        this.principal = principal;
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return principal;
    }

}
